<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
	session_start();
	if (isset($_SESSION['username'])) {
?>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>BINDER - POST</title>
		<link rel="stylesheet" type="text/css" href="style2.css" title="style2" />
		<script type="text/javascript" src="script.js"></script>
		<script type="text/javascript" src="post.js"></script>
	</head>
	<body>
		<div id="wrapper">
			<div id="header"><? include('header.php'); ?></div>
			<div id="main">
				<div id="konten">
					<div class="atas-post">
					</div>
					<div class="tengah">
						<div class="judul" id="headerpostkonten">
							Post Konten
						</div>
						<div class="isi" id="postkonten">
							<form action="propost.php" method="post" enctype="multipart/form-data" onsubmit="return validateform()">
								<div class="register-label">Judul</div><div class="register-td">:</div><div class="register-input"><input class="register-input-input" type="text" name="judul" id="judul" onblur="valTitle(this,'error-username')"/></div>
								<div class="clear error btg-mrh" id="error-username"></div>
								<div class="register-label">Jenis konten</div><div class="register-td">:</div><div class="register-input"><input type="radio" name="sex" id="sex-link" value="link" onclick="linkClicked();" /> Link <input type="radio" name="sex" id="sex-gambar" value="gambar" onclick="gambarClicked();" /> Gambar <input type="radio" name="sex" id="sex-video" value="video" onclick="videoClicked();" /> Video</div>
								<div class="clear" id="error-sex"></div>
								<div id="opt"></div>
								
								<div id="artikel">
									<div class="register-label">URL artikel</div><div class="register-td">:</div><div class="register-input"><input class="register-input-input" type="text" name="artikel" id="kontenartikel"/></div>
									<div class="clear error" id="error-artikel"></div>
									<div class="register-label">Deskripsi singkat</div><div class="register-td">:</div><div class="register-input"><textarea class="register-input-input" name="about" id="kontendeskripsi" rows="5" cols="25"></textarea></div>
									<div class="clear"></div>
								</div>
								<div id="avatar">
									<div class="register-label">File gambar</div><div class="register-td">:</div><div class="register-input"><input class="register-input-input" type="file" name="avatar" id="kontenavatar" /></div>
									<div class="clear" id="error-gambar"></div>
								</div>
								<div id="youtube">
									<div class="register-label">URL YouTube</div><div class="register-td">:</div><div class="register-input"><input class="register-input-input" type="text" name="youtube" id="kontenyoutube" /><br />
									Contoh : http://www.youtube.com/watch?v=LCXd78RUtUA</div>
									<div class="clear error" id="error-youtube"></div>
								</div>
								<div id="tag">
									<div class="register-label">Tag</div><div class="register-td">:</div><div class="register-input"><textarea class="register-input-input" name="tag" id="kontentag" rows="1" cols="25"></textarea><br />
									Tag dipisahkan ',' contoh : tag1,tag2</div>
									<div class="clear"></div>
								</div>
								
								<div class="post-register-submit">
									<input type="button" name="preview" value="Preview !" onclick="previewContent()"/>
									<input type="submit" name="post" value="Post !" />
								</div>
							</form>
						</div>
						
						<div id="afterpost">
							<div class="judul" id="apjudul"></div>
							<div id="ap-artikel">
								<div id="ap-kontenartikel"></div>
								<div id="ap-kontendeskripsi"></div>
							</div>
							<div id="ap-avatar">
								<div id="kontengambar"></div>
							</div>
							<div id="ap-youtube">
							</div>
						</div>
						
					</div>
					<div class="bawah">
					</div>
					
				</div>
				<div id="sidebar"><? include('sidebar.php'); ?></div>
			</div>
			<div id="footer"><? include('footer.php'); ?></div>
		</div>
		<script type="text/javascript" src="post.js"></script>
	</body>
</html>
<?php
	}else{
		$_SESSION['loginstatus'] = "Please log in to post";
		header("Location: index.php");
	}
?>